//
//  CarcircleDetailViewController.m
//  CarUser
//
//  Created by 王森林 on 2019/1/23.
//  Copyright © 2019年 王森林. All rights reserved.
//

#import "CarcircleDetailViewController.h"
#import "CustomIMSendMessageView.h"

@interface  CarcircleDetailViewController()
@property (nonatomic, strong) NSDictionary *dataDict;
@property (nonatomic, strong) UIScrollView *scroll;
@property (nonatomic, strong) UIView *topView;

@property (nonatomic, strong) UILabel *titleLabel;
@property (nonatomic, strong) UILabel *subtitleLabel;
@property (nonatomic, strong) UIImageView *imgView;
@property (nonatomic, strong) UILabel *dateLabel;
@property (nonatomic, strong) UILabel *numLabel;
@property (nonatomic, strong) UILabel *contentLabel;

@property (nonatomic, strong) UIView  *zanView;
@property (nonatomic, strong) UIView  *bottomView;
@property (nonatomic, strong) UIView  *commentView;
@property (nonatomic, strong) UIImageView  *zanImageView;
@property (nonatomic, strong) UILabel  *zanLabel;
@property (nonatomic, strong) NSArray  *commentAry;
@property (nonatomic)  float viewY;
@property (nonatomic)  NSInteger zanNum;
@property (nonatomic, strong) CustomIMSendMessageView *imSendMessageView;//发送消息view
@end
#define ZANTAG 100000
@implementation CarcircleDetailViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.title  = @"话题详情";
    [self fetchDataFromNet];
    // Do any additional setup after loading the view.
}

- (void)createUI
{
    [self.view  removeAllSubviews];
    self.topView = nil;
    self.zanView = nil;
    self.bottomView = nil;
    self.commentView = nil;
    self.scroll = nil;
    self.imSendMessageView = nil;
    self.viewY = 0;
    [self.view addSubview:self.scroll];
    self.scroll.frame = CGRectMake(0, 0, BOUNDWIDTH, BOUNDHEIGHT);
    
    
    [self.scroll addSubview:self.topView];
    [self createTopView];
    [self createImgsView];
    
    
    if (self.imSendMessageView ==nil) {
        self.imSendMessageView = [[CustomIMSendMessageView alloc]initWithFrame:CGRectMake(0, BOUNDHEIGHT - 64-50, BOUNDWIDTH, 50)];
        CWeakSelf;
        self.imSendMessageView.CustomIMCallBack = ^(UITextField * _Nonnull textf) {
            [weakSelf publishTextWithContent:textf.text];
        };
        
        [self.view addSubview:self.imSendMessageView];
    }

    
   
}


- (void)createBottomView
{
    
    [self.scroll addSubview:self.zanView];
    
    self.zanView.frame = CGRectMake((BOUNDWIDTH - 120)/2, self.viewY, 120, 40);
    self.zanNum = [[self.dataDict objectForKey:@"DZS000"] integerValue];
    [self createZanView];
    self.viewY = self.viewY+60;
    
    UITapGestureRecognizer *zanTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleZanTap:)];
    [self.zanView addGestureRecognizer:zanTap];
    

    [self.scroll addSubview:self.commentView];
    self.commentView.frame = CGRectMake(0, self.viewY + 10, BOUNDWIDTH, 1000);
    //    self.commentView.backgroundColor = [UIColor redColor];
    [self createCommentView];
}

- (void)publishTextWithContent:(NSString *)content
{
    
    
    UserRes *user = [CommonMethod getUser];
    if (!user) {
        [[NSNotificationCenter defaultCenter]postNotificationName:NotificationCenterName_AlertLoginVC object:nil];
        return;
    }
//    NSDictionary *infoDict  =  [self.dataDict objectForKey:@"info"];
    NSDictionary *params = @{
                             @"FKEY":[CommonMethod createMD5Key:@"TOKEN"],
                             @"TOKEN":user.TOKEN,
                             @"content":content,
                             @"id":self.ID
                             
                             };
    
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showWithStatus:nil];
    });
    
    [[ZY_AfnNetManager shareInstance]postWithURL:Car_API_CIRCLE_36 params:params md5Paraname:nil success:^(id  _Nullable response) {
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD dismiss];
        });
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showInfoWithStatus:@"评论成公"];
            //                [SVProgressHUD dismissWithDelay:10];
        });
        [self fetchDataFromNet];
        
        
        
    } fail:^(NSError * _Nonnull error) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showErrorWithStatus:error.localizedDescription];
        });
        
    }];
}

- (void)handleZanAction:(id)sender
{
    UIButton *btn = sender;
    NSInteger tag = btn.tag - ZANTAG;
    
    NSDictionary *dict = self.commentAry[tag];
    UserRes *user = [CommonMethod getUser];
    if (!user) {
        [[NSNotificationCenter defaultCenter]postNotificationName:NotificationCenterName_AlertLoginVC object:nil];
        return;
    }
    NSDictionary *params = @{
                             @"FKEY":[CommonMethod createMD5Key:@"TOKEN"],
                             @"id":[dict objectForKey:@"TALKCOMMENT_ID"],
                             @"TOKEN":user.TOKEN
                             };
    
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showWithStatus:nil];
    });
    
    [[ZY_AfnNetManager shareInstance]postWithURL:Car_API_CIRCLE_41 params:params md5Paraname:nil success:^(id  _Nullable response) {
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD dismiss];
        });
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showInfoWithStatus:@"点赞成功"];
            //                [SVProgressHUD dismissWithDelay:10];
        });
        [btn setImage:IMG(@"zan2") forState:UIControlStateNormal];
        NSInteger num = btn.titleLabel.text.integerValue + 1;
        [btn setTitle:[NSString stringWithFormat:@"%ld",num] forState:UIControlStateNormal];
        
        
        
        
        
    } fail:^(NSError * _Nonnull error) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showErrorWithStatus:error.localizedDescription];
        });
        
    }];
    
}

- (void)createCommentView
{
    [self.commentView removeAllSubviews];
    UILabel *lineLabel = [[UILabel alloc] initWithFrame:CGRectMake(15, 10, 4, 14)];
    lineLabel.backgroundColor = Common_TextLowColor;
    [self.commentView addSubview:lineLabel];
    
    UILabel *titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(24, 10, BOUNDWIDTH - 50, 14)];
    titleLabel.text = @"车友评论";
    titleLabel.textColor = [UIColor blackColor];
    titleLabel.font = FONT_SIZE(16);
    [self.commentView addSubview:titleLabel];
    
    
    
    if ( self.commentAry.count > 0) {
        __block float commentY = 25;
        [self.commentAry enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            UIView *bgView = [UIView new];
            bgView.frame = CGRectMake(0, 25+100*idx, BOUNDWIDTH, 100);
            [self.commentView addSubview:bgView];
            
            UIImageView *logoImgv = [[UIImageView alloc]init];
            UILabel  *titleLab = [UILabel customInitLabWithFont:14 andTextColor:Common_TextColor andAlign:NSTextAlignmentLeft];
            UIView *contentBgView = [[UIView alloc]init];
            contentBgView.backgroundColor = Common_Head_Color;
            contentBgView.layer.masksToBounds = YES;
            contentBgView.layer.cornerRadius = 4;
            UILabel *commentLab = [UILabel customInitLabWithFont:12 andTextColor:Common_TextColor andAlign:NSTextAlignmentLeft];
            commentLab.numberOfLines = 0;
            UILabel   *timeLab = [UILabel customInitLabWithFont:10 andTextColor:Common_TextLowColor andAlign:NSTextAlignmentLeft];
            //        UIView *lineview = [[UIView alloc]init];lineview.backgroundColor = Common_SepeColor;
            
            
            UIButton *favorBtn = ({
                UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
                [btn setImage:IMG(@"zan1") forState:UIControlStateNormal];
                btn.titleLabel.font = FONT_SIZE(10);
                [btn setTitleColor:Common_TextColor forState:UIControlStateNormal];
                btn;
            });
            
            [bgView addSubview:logoImgv];
            [bgView addSubview:titleLab];
            [bgView addSubview:contentBgView];
            [contentBgView addSubview:commentLab];
            [bgView addSubview:timeLab];
            //        [self.contentView addSubview:lineview];
            
            
            [bgView addSubview:favorBtn];
            
            NSDictionary *dict = obj;
            [logoImgv sd_setImageWithURL:[NSURL URLWithString:APPEND_URL(BASE_URL, [dict objectForKey:@"headIcon"])] placeholderImage:IMG(@"headImage")];
            titleLab.text = [dict objectForKey:@"nickName"];
            commentLab.text =  [dict objectForKey:@"PLNR00"];
            timeLab.text = [dict objectForKey:@"SJ0000"];
            [favorBtn setTitle:[NSString stringWithFormat:@"%@",[dict objectForKey:@"praise"]] forState:UIControlStateNormal];
            
            NSInteger  DZFLAG = [[dict objectForKey:@"DZFLAG"] integerValue];
            if (DZFLAG == 1) {
                [favorBtn setImage:IMG(@"zan2") forState:UIControlStateNormal];
            } else {
                
                [favorBtn setImage:IMG(@"zan1") forState:UIControlStateNormal];
            }
            
            
            logoImgv.frame = CGRectMake(15, 15, 40, 40);
            logoImgv.layer.masksToBounds = YES;
            logoImgv.layer.cornerRadius = 20;
            
            titleLab.frame = CGRectMake(65, 10, BOUNDWIDTH- 80, 20);
            
            CGSize size = [CommonMethod labWidthFromStr:commentLab.text andFont:commentLab.font andWidth:BOUNDWIDTH -100];
            
            contentBgView.frame = CGRectMake(65, 35, BOUNDWIDTH - 80, size.height + 20);
            commentLab.frame = CGRectMake(10, 5, BOUNDWIDTH - 100, size.height + 10);
            timeLab.frame = CGRectMake(65, contentBgView.size.height + 35+10, 120, 14);
            favorBtn.frame = CGRectMake(BOUNDWIDTH -45 ,contentBgView.size.height + 35+10 , 30, 14);
            favorBtn.tag = ZANTAG +idx;
            [favorBtn addTarget:self action:@selector(handleZanAction:) forControlEvents:UIControlEventTouchUpInside];
            [favorBtn setTitleEdgeInsets:UIEdgeInsetsMake(0 ,0, 0.0,-15)];//文字距离上边框的距离增加imageView的高度，距离左边框减少imageView的宽度，距离下边框和右边框距离不变
            [favorBtn setImageEdgeInsets:UIEdgeInsetsMake( 0, 0,0.0, 0)];//
            
            bgView.frame = CGRectMake(0, commentY, BOUNDWIDTH, contentBgView.size.height + 35+10+20);
            commentY = commentY + contentBgView.size.height + 35+10+20;
            
        }];
        self.commentView.frame = CGRectMake(0, self.viewY + 10, BOUNDWIDTH, commentY);
        self.viewY = self.viewY + commentY;
        
    } else {
        
        UIImageView *noDataImageView = [[UIImageView alloc] initWithFrame:CGRectMake((BOUNDWIDTH - 56)/2, 100, 56, 50)];
        noDataImageView.image = IMG(@"pinglun");
        [self.commentView addSubview:noDataImageView];
        
        UILabel *titleLabel1 = [[UILabel alloc] initWithFrame:CGRectMake(0,170 , BOUNDWIDTH, 15)];
        titleLabel1.text = @"评论空空~";
        titleLabel1.textAlignment = NSTextAlignmentCenter;
        titleLabel1.font = FONT_SIZE(15);
        titleLabel1.textColor = Common_TextLowColor;
        [self.commentView addSubview:titleLabel1];
        self.commentView.frame = CGRectMake(0, self.viewY + 10, BOUNDWIDTH, 200);
        self.viewY = self.viewY + 200;
        
    }
    
    
    self.scroll.contentSize = CGSizeMake(BOUNDWIDTH, self.viewY+200);
    
    
}

- (void)createImgsView
{
    NSArray *imgsAry = [self.dataDict objectForKey:@"imageList"];
    if (imgsAry.count > 0) {
        __block float y = self.contentLabel.size.height+self.contentLabel.origin.y+10;
        __block NSInteger num = 0;
        [imgsAry enumerateObjectsUsingBlock:^(id  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            NSString *url = APPEND_URL(BASE_URL,[obj objectForKey:@"TPLJ00"]);
            UIImageView *imageView = [[UIImageView alloc] init];
            [imageView sd_setImageWithURL:[NSURL URLWithString:url] completed:^(UIImage * _Nullable image, NSError * _Nullable error, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
                NSLog(@"大小%f",image.size.width);
                NSLog(@"大小%f",image.size.height);
                float width = BOUNDWIDTH - 30;
                if (image.size.width != 0) {
                    width = image.size.width;
                }
                float height = 100;
                if (image.size.height != 0) {
                    height = image.size.height;
                }
                
                float rate = (BOUNDWIDTH - 30)/width;
                imageView.frame = CGRectMake(15, y, BOUNDWIDTH- 30, rate*height);
                y = y + imageView.frame.size.height+15;
                num = num + 1;
                if (num == imgsAry.count) {
                    self.viewY = self.viewY + y;
                   [self  createBottomView];
                }
            }];
    
            [self.scroll addSubview:imageView];
        }];
    
      
    } else {
         self.viewY = self.topView.frame.size.height+70;
         [self  createBottomView];
    }
    
//     [self  createBottomView];
    
}

- (void)createTopView
{
    
//    NSDictionary *infoDict = [self.dataDict objectForKey:@"info"];
    self.titleLabel.text = [self.dataDict objectForKey:@"BT0000"];
    [self.imgView sd_setImageWithURL:[NSURL URLWithString:APPEND_URL(BASE_URL, [self.dataDict objectForKey:@"headIcon"])] placeholderImage:IMG(@"headImage")];
    self.subtitleLabel.text = [self.dataDict objectForKey:@"nickName"];
    self.dateLabel.text = [self.dataDict objectForKey:@"SJ0000"];
    self.numLabel.text = [NSString stringWithFormat:@"阅读:  %@",[self.dataDict objectForKey:@"LLS000"]];
    
    [self.topView addSubview:self.titleLabel];
    [self.topView addSubview:self.imgView];
    [self.topView addSubview:self.subtitleLabel];
    [self.topView addSubview:self.dateLabel];
    [self.topView addSubview:self.numLabel];
    
    CGSize size = [CommonMethod labWidthFromStr:self.titleLabel.text andFont:self.titleLabel.font andWidth:BOUNDWIDTH -30];
    self.titleLabel.frame = CGRectMake(15, 15, BOUNDWIDTH - 30, size.height + 10);
    self.imgView.frame = CGRectMake(15, size.height + 10+10+15, 50, 50);
    self.imgView.layer.cornerRadius = 25;
    self.imgView.layer.masksToBounds = YES;
    self.subtitleLabel.frame = CGRectMake(75,  size.height + 10+10+20, BOUNDWIDTH - 90, 15);
    self.dateLabel.frame = CGRectMake(75, size.height+85-20, 120, 14);
    self.numLabel.frame = CGRectMake(200, size.height+85-20, BOUNDWIDTH - 215, 15);
    self.topView.frame = CGRectMake(0, 0, BOUNDWIDTH, size.height+80);
    
    [self.scroll addSubview:self.contentLabel];
    
    NSString * htmlString = [self.dataDict objectForKey:@"WZNR00"];
    NSAttributedString * attrStr = [[NSAttributedString alloc] initWithData:[htmlString dataUsingEncoding:NSUnicodeStringEncoding] options:@{ NSDocumentTypeDocumentAttribute: NSHTMLTextDocumentType } documentAttributes:nil error:nil];
    CGSize contentSize = [CommonMethod labWidthFromStr:self.contentLabel.text andFont:self.contentLabel.font andWidth:BOUNDWIDTH -30];
    self.contentLabel.attributedText = attrStr;
    //    self.viewY = self.topView.frame.size.height+10;
    self.contentLabel.frame = CGRectMake(15, self.topView.frame.size.height+10, BOUNDWIDTH - 30, contentSize.height + 15);
//    self.viewY = self.viewY +  contentSize.height + 15+10;
   
    
}
-(void)createZanView
{
    self.zanImageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, (40-15)/2, 15, 15)];
    self.zanImageView.image = IMG(@"zan1");
    [self.zanView addSubview:self.zanImageView];
    
    self.zanLabel = [UILabel new];
    self.zanLabel.frame = CGRectMake(25, 13, 120-30, 14);
    self.zanLabel.textColor = Common_TextColor;
    self.zanLabel.font = FONT_SIZE(13);
    self.zanLabel.textAlignment = NSTextAlignmentCenter;
    self.zanLabel.text = [NSString stringWithFormat:@"%ld个人点赞",self.zanNum];
    [self.zanView addSubview:self.zanLabel];
    
    
    
    NSInteger isZan = [[self.dataDict objectForKey:@"DZFLAG"] intValue];
    if (isZan == 1) {
    self.zanImageView.image = IMG(@"zan2");
    }
    
}
- (void)handleZanTap:(UIGestureRecognizer *)gesture
{
    
    
    NSInteger isZan = [[self.dataDict objectForKey:@"DZFLAG"] intValue];
    if (isZan == 1) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showInfoWithStatus:@"您已经点赞～"];
            //                [SVProgressHUD dismissWithDelay:10];
        });
        return;
    }
    
    UserRes *user = [CommonMethod getUser];
    if (!user) {
        [[NSNotificationCenter defaultCenter]postNotificationName:NotificationCenterName_AlertLoginVC object:nil];
        return;
    }
    NSDictionary *params = @{
                             @"FKEY":[CommonMethod createMD5Key:@"TOKEN"],
                             @"id":self.ID,
                             @"TOKEN":user.TOKEN
                             };
    
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showWithStatus:nil];
    });
    
    [[ZY_AfnNetManager shareInstance]postWithURL:Car_API_CIRCLE_37 params:params md5Paraname:nil success:^(id  _Nullable response) {
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD dismiss];
        });
        self.zanImageView.image = IMG(@"zan2");
        
        self.zanNum = self.zanNum + 1;
        self.zanLabel.text = [NSString stringWithFormat:@"%ld个人点赞",self.zanNum];
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showInfoWithStatus:@"点赞成功"];
            //                [SVProgressHUD dismissWithDelay:10];
        });
        [self fetchDataFromNet];
    } fail:^(NSError * _Nonnull error) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showErrorWithStatus:error.localizedDescription];
        });
        
    }];
    
    
}

- (void)fetchDataFromNet
{
    //收藏夹列表
//    UserRes *user = [CommonMethod getUser];
//    NSDictionary *params = @{
//                             @"FKEY":[CommonMethod createMD5Key:@"id"],
//                             @"id":self.ID,
//                             @"DZTOKEN":user.TOKEN
//
//                             };
    
    NSMutableDictionary *params = [[NSMutableDictionary alloc] init];
    [params setObject:[CommonMethod createMD5Key:@"id"] forKey:@"FKEY"];
    [params setObject:self.ID forKey:@"id"];
    UserRes *user = [CommonMethod getUser];
    if (user) {
        [params setObject:user.TOKEN forKey:@"DZTOKEN"];
    }
    
    
    dispatch_async(dispatch_get_main_queue(), ^{
        [SVProgressHUD showWithStatus:nil];
    });
    
    [[ZY_AfnNetManager shareInstance]postWithURL:Car_API_34 params:params md5Paraname:nil success:^(id  _Nullable response) {
        
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD dismiss];
        });
        self.dataDict  = [response objectForKey:@"data"];
        NSArray *ary = [self.dataDict objectForKey:@"commentList"];
        if (ary != nil && ![ary isKindOfClass:[NSNull class]] && ary.count != 0) {
            
            self.commentAry  = [NSArray arrayWithArray:ary];
        }

        [self createUI];
    
        
        
        
    } fail:^(NSError * _Nonnull error) {
        dispatch_async(dispatch_get_main_queue(), ^{
            [SVProgressHUD showErrorWithStatus:error.localizedDescription];
        });
        
    }];
    
    
    
}

//- (void)fetchCommentFromNet
//{
//
//    //    UserRes *user = [CommonMethod getUser];
//    NSDictionary *params = @{
//                             @"FKEY":[CommonMethod createMD5Key:@"ARTICLE_ID"],
//                             @"ARTICLE_ID":self.ID
//
//                             };
//
//    dispatch_async(dispatch_get_main_queue(), ^{
//        [SVProgressHUD showWithStatus:nil];
//    });
//
//    [[ZY_AfnNetManager shareInstance]postWithURL:Car_API_4 params:params md5Paraname:nil success:^(id  _Nullable response) {
//
//        dispatch_async(dispatch_get_main_queue(), ^{
//            [SVProgressHUD dismiss];
//        });
//        NSArray *ary = [response objectForKey:@"list"];
//        if ([ary isKindOfClass:[NSArray class]] && ary.count > 0) {
//
//            self.commentAry  = [NSArray arrayWithArray:ary];
//        }
//
//
//
//        [self createUI];
//        //        NSDictionary *resultDict  = response;
//        //        self.listAry = [NSMutableArray arrayWithArray:[resultDict objectForKey:@"list"]];
//        //        [self.mainTableView reloadData];
//
//
//
//    } fail:^(NSError * _Nonnull error) {
//        dispatch_async(dispatch_get_main_queue(), ^{
//            [SVProgressHUD showErrorWithStatus:error.localizedDescription];
//        });
//
//    }];
//
//
//
//}


- (UIScrollView *)scroll
{
    if (!_scroll) {
        _scroll = [UIScrollView new];
    }
    return _scroll;
    
}

- (UIView *)topView
{
    if (!_topView) {
        _topView = [UIView new];
    }
    return _topView;
    
}

-  (UILabel *)titleLabel
{
    if (!_titleLabel) {
        _titleLabel = [UILabel new];
        _titleLabel.numberOfLines = 0;
        _titleLabel.textColor = Common_TextColor;
        _titleLabel.font = B_FONT_SIZE(16);
    }
    return _titleLabel;
    
}

-  (UILabel *)subtitleLabel
{
    if (!_subtitleLabel) {
        _subtitleLabel = [UILabel new];
        _subtitleLabel.textColor = Common_TextColor;
        _subtitleLabel.font = FONT_SIZE(15);
    }
    return _subtitleLabel;
    
}

- (UIImageView *)imgView
{
    
    if (!_imgView) {
        _imgView = [UIImageView new];
    }
    return _imgView;
}

-  (UILabel *)dateLabel
{
    if (!_dateLabel) {
        _dateLabel = [UILabel new];
        _dateLabel.textColor = Common_TextLowColor;
        _dateLabel.font = FONT_SIZE(11);
    }
    return _dateLabel;
    
}

-  (UILabel *)numLabel
{
    if (!_numLabel) {
        _numLabel = [UILabel new];
        _numLabel.textColor = Common_TextLowColor;
        _numLabel.font = FONT_SIZE(11);
        _numLabel.textAlignment = NSTextAlignmentRight;
    }
    return _numLabel;
    
}


-  (UILabel *)contentLabel
{
    if (!_contentLabel) {
        _contentLabel = [UILabel new];
        _contentLabel.textColor = Common_HeadTitle_Color;
        _contentLabel.font = FONT_SIZE(15);
    }
    return _contentLabel;
    
}
- (UIView *)zanView
{
    if (!_zanView) {
        _zanView = [UIView new];
        _zanView.layer.borderColor = Common_TextLowColor.CGColor;
        _zanView.layer.borderWidth = 1;
        _zanView.layer.cornerRadius = 10;
        _zanView.layer.masksToBounds = YES;
    }
    
    return _zanView;
}

- (UIView *)bottomView
{
    if (!_bottomView) {
        _bottomView = [UIView new];
    }
    
    return _zanView;
}

- (UIView *)commentView
{
    if (!_commentView) {
        _commentView = [UIView new];
    }
    
    return _commentView;
}


@end
